package com.sv.zgydor.pojo.pg;

import javax.persistence.*;

/**
 * Class summary
 * User: kevin
 * Date: 2017/09/23
 * Time: 21:16
 * Description:
 */
@Entity
@Table(name = "table1", catalog = "\"dgor-data\"")
public class Table1Entity {
    private Long id1;
    private String name1;

    @Id
    @Column(name = "id1")
    public Long getId1() {
        return id1;
    }

    public void setId1(Long id1) {
        this.id1 = id1;
    }

    @Basic
    @Column(name = "name1")
    public String getName1() {
        return name1;
    }

    public void setName1(String name1) {
        this.name1 = name1;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Table1Entity that = (Table1Entity) o;

        if (id1 != null ? !id1.equals(that.id1) : that.id1 != null) return false;
        if (name1 != null ? !name1.equals(that.name1) : that.name1 != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id1 != null ? id1.hashCode() : 0;
        result = 31 * result + (name1 != null ? name1.hashCode() : 0);
        return result;
    }
}
